var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2EventCenter = require("EventCenter");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_Eventlabel = /* */function (_cc$Component13) {
  function _ctor() {
    var _this21;
    babel_classCallCheck(this, _ctor);
    _this21 = _callSuper(this, _ctor, arguments);
    _this21.evemtname = "";
    return _this21;
  }
  babel_inherits(_ctor, _cc$Component13);
  return babel_createClass(_ctor, [{
    key: "onLoad",
    value: function onLoad() {
      this.lb = this.node.getComponent(cc.Label);
      $2EventCenter.default.regisEvent(this.evemtname, this.setlabel, this);
    }
  }, {
    key: "setlabel",
    value: function setlabel(e) {
      this && this.lb && (this.lb.string = e);
    }
  }, {
    key: "onDestroy",
    value: function onDestroy() {
      $2EventCenter.default.removeEvent(this.evemtname, this.setlabel, this);
    }
  }]);
}(cc.Component);
cc__decorate([ccp_property()], def_Eventlabel.prototype, "evemtname", undefined);
def_Eventlabel = cc__decorate([ccp_ccclass], def_Eventlabel);
exports.default = def_Eventlabel;